<?php

use Illuminate\Routing\Router;

Admin::registerHelpersRoutes();

Route::group([
    'prefix'        => config('admin.prefix'),
    'namespace'     => Admin::controllerNamespace(),
    'middleware'    => ['web', 'admin'],
], function (Router $router) {

    $router->get('/', 'HomeController@geren');
    $router->get('/tongji', 'HomeController@index');
    
    $router->get('/xiaoxi/zhuanyuan', 'XiaoxiController@zhuanyuan');//专员消息提醒
    $router->get('/fatuan/{deal}/{order}', 'XiaoxiController@fatuan');//专员消息提醒发团改变
    $router->get('/skxiaoxi/{receive}/{order}', 'XiaoxiController@skxiaoxi');//消息提醒收款改变
    $router->get('/qkxiaoxi/{funds}/{order}', 'XiaoxiController@qkxiaoxi');//消息提醒请款改变
    $router->get('/jsxiaoxi/{deal}/{order}', 'XiaoxiController@jsxiaoxi');//消息提醒结算改变
    $router->get('/xiaoxi/caiwu', 'XiaoxiController@caiwu');//财务消息提醒
    $router->get('/xiaoxi/zongjingli', 'XiaoxiController@zongjingli');//总经理消息提醒
    $router->get('/xiaoxi/shengri/{id}', 'XiaoxiController@shengri');//客户生日短信
    $router->get('/xiaoxi/ykshengri/{id}', 'XiaoxiController@youke');//游客生日短信
    $router->post('/xiaoxi/duanxin', 'XiaoxiController@duanxin');//自定义短信发送
    $router->post('/xiaoxi/duanxinyk', 'XiaoxiController@duanxinyk');//自定义短信发送游客

    $router->resource('users', UserController::class); //员工管理
    
    $router->resource('admin_users', Admin_usersController::class); //个人中心

    $router->resource('crm_account', Crm_accountController::class); //账户管理

    $router->resource('crm_tourist', Crm_touristController::class); //游客管理

    $router->resource('crm_route', Crm_routeController::class); //线路类别管理

    $router->resource('crm_biaoqian', Crm_biaoqianController::class); //线路标签管理

    $router->resource('crm_supplier', Crm_supplierController::class); //供应商管理

    $router->resource('supplier_type', Supplier_typeController::class); //供应商账户类别管理
    $router->resource('crm_kehutongji', Crm_kehutongjiController::class); //客户统计
    $router->post('crm_kehutongji/kehu', 'Crm_kehutongjiController@kehu'); //客户表单提交后统计
    $router->resource('crm_chengjiao', Crm_chengjiaoController::class); //成交单统计
    $router->resource('crm_hesuan', Crm_hesuanController::class); //结算单统计
    $router->resource('crm_gongyingshang', Crm_gongyingshangController::class); //结算单统计
    $router->get('/gdindex/ajax13', 'Crm_chengjiaoController@ajax'); //旅游类型调用
    $router->post('crm_chengjiao/chengjiao', 'Crm_chengjiaoController@chengjiao'); //筛选统计调用
    $router->post('crm_hesuan/chengjiao', 'Crm_hesuanController@chengjiao'); //筛选统计调用
    $router->post('crm_gongyingshang/chengjiao', 'Crm_gongyingshangController@chengjiao'); //筛选统计调用

    
    $router->get('supplier_type/{id}/create','Supplier_typeController@tianjia'); //供应商账户类别添加
    $router->get('supplier_type/del/{id}','Supplier_typeController@del'); //供应商账户类别删除
    $router->get('supplier_type/info/{id}','Supplier_typeController@info'); //供应商账户类别删除页面
    $router->post('supplier_type/update/{id}','Supplier_typeController@xiugai'); //供应商账户类别执行修改

    $router->resource('crm_customer', Crm_customerController::class); //客户管理
    $router->resource('crm_guanhuai', Crm_guanhuaiController::class); //客户关怀
    $router->resource('crm_ykguanhuai', Crm_ykguanhuaiController::class); //游客关怀

    $router->resource('crm_diaocha', Crm_diaochaController::class); //意向调查
    $router->get('/gdindex/ajax11', 'Crm_orderController@ajax11'); //供应商类别调用
    $router->get('/gdindex/ajax12', 'Crm_diaochaController@ajax'); //旅游类型调用

    $router->resource('crm_kehu', Crm_kehuController::class); //客户管理工单
    $router->post('crm_kehu/info', 'Crm_kehuController@info'); //客户搜索
    $router->get('crm_kehu/info2/{id}', 'Crm_kehuController@info2'); //客户单条数据
    $router->get('crm_kehu/xiadan/{id}', 'Crm_kehuController@xiadan'); //工单录入
    $router->get('/gdindex/ajax5', 'Crm_kehuController@ajax5'); //保存工单信息
    $router->get('/gdindex/ajax6', 'Crm_kehuController@ajax6'); //供应商类别调用
    $router->get('/gdindex/ajax7', 'Crm_kehuController@ajax7'); //供应商类别调用
    $router->post('crm_kehu/tianjia', 'Crm_kehuController@tianjia'); //工单添加

    $router->resource('crm_order', Crm_orderController::class); //工单管理
    $router->post('crm_order/gdxiugai/{id}', 'Crm_orderController@gdxiugai'); //工单管理修改
    $router->post('crm_order/cjtianjia/{id}', 'Crm_orderController@cjtianjia'); //成交单添加
    $router->get('gdindex/ajax8', 'Crm_orderController@ajax8');//实现成交单录入合同号
    $router->post('crm_order/cjxiugai/{id}', 'Crm_orderController@cjxiugai'); //成交单修改
    $router->get('crm_order/{id}/create', 'Crm_orderController@create'); //回访添加页面调用
    $router->post('crm_order/hfstore/{id}','Crm_orderController@hfstore');//添加回访记录
    $router->post('crm_order/hfbeizhu/{id}', 'Crm_orderController@hfbeizhu'); //回访备注添加
    $router->get('crm_order/skcreate/{id}', 'Crm_orderController@skcreate'); //收款记录添加页面
    $router->post('crm_order/sktianjia/{id}', 'Crm_orderController@sktianjia'); //收款记录执行添加
    $router->get('crm_order/qkcreate/{id}', 'Crm_orderController@qkcreate'); //请款记录添加页面
    $router->post('crm_order/qktianjia/{id}', 'Crm_orderController@qktianjia'); //收款记录执行添加
    $router->get('crm_order/hesuan/{id}', 'Crm_orderController@hesuan'); //申请核算
    $router->get('crm_order/cwhesuan/{id}', 'Crm_orderController@cwhesuan'); //财务核算
    $router->get('crm_order/lktianjia/{id}', 'Crm_orderController@lktianjia'); //游客添加
    $router->post('crm_order/lkxinzeng/{id}', 'Crm_orderController@lkxinzeng'); //游客添加
    $router->post('crm_order/shangchuan/{id}', 'Crm_orderController@shangchuan'); //游客上传
    $router->get('crm_order/huifangxinzeng/{id}', 'Crm_orderController@huifangxinzeng'); //回访日期添加
    $router->post('crm_order/huifangtianjia/{id}', 'Crm_orderController@huifangtianjia'); //回访记录添加执行
    $router->post('crm_order/hfzhuangtai/{id}', 'Crm_orderController@hfzhuangtai'); //回访状态修改
    $router->post('crm_order/manyidu/{id}', 'Crm_orderController@manyidu'); //满意度添加
    $router->get('crm_order/yixiangtianjia/{id}', 'Crm_orderController@yixiangtianjia'); //下次意向调查
    $router->post('crm_order/dctianjia/{id}', 'Crm_orderController@dctianjia'); //下次意向添加

    $router->get('gdindex/ajax10', 'Crm_orderController@ajax10');//实现成交单录入合同号
    $router->get('gdindex/ajax9', 'Crm_orderController@ajax9');//实现成交单录入合同号
    $router->resource('crm_receive', Crm_receiveController::class); //收款管理
    $router->resource('crm_funds', Crm_fundsController::class); //请款管理
    $router->resource('crm_shenpi', Crm_shenpiController::class); //垫资审批管理
    
    $router->resource('crm_deal', Crm_dealController::class); //结算管理

    $router->resource('crm_ruku', Crm_rukuController::class); //合同入库管理
    $router->get('piliang', 'Crm_rukuController@piliang'); //合同入库管理批量添加
    $router->post('pltianjia', 'Crm_rukuController@pltianjia'); //合同入库管理批量添加执行
    $router->post('fenpei', 'Crm_rukuController@fenpei'); //合同入库管理批量分配
    $router->get('fplingyong/{usernameid}/{hetongid}', 'Crm_rukuController@fplingyong'); //合同入库批量分配领用

    $router->resource('crm_lingyong', Crm_lingyongController::class); //合同领用管理
    $router->resource('crm_hexiao', Crm_hexiaoController::class); //合同核销管理
    $router->get('crm_hexiao/zhuangtai/{id}', 'Crm_hexiaoController@zhuangtai'); //合同核销状态


    $router->resource('crm_hetongtype', Crm_hetongtypeController::class); //合同类型管理
    $router->resource('crm_duanxin', Crm_duanxinController::class);//短信模板管理
   
    
});
